<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<script src="js/mui.min.js"></script>
		<link href="css/mui.min.css" rel="stylesheet" />
		<script type="text/javascript" charset="utf-8">
			mui.init();
		</script>
		<style>
			button {
				width: 75%;
				margin-top: 5px;
				margin-bottom: 5px;
			}
		</style>
	</head>

	<body>

		<div class="mui-content" style="padding: 20px;">
			<label style="display: block;" id="ver"></label>
			<button onclick="appUpdateClick(1)">整包(apk/ipa)升级</button>
			<button onclick="appUpdateClick(2)">应用资源升级</button>
			<button onclick="appUpdateClick(3)">应用资源差量升级</button>
		</div>

		<script src="js/update.js"></script>
		<script src="html5plus://ready"></script>
		<script>
			var curVer;
			plus.runtime.getProperty(plus.runtime.appid, function(inf) {
				curVer = inf.version;
				document.getElementById("ver").innerText = "版本号：" + curVer;
			});
			
			function appUpdateClick(code) {
				switch(code) {
					case 1:
						appUpdate(curVer, "1");
						break;
					case 2:
						appUpdate(curVer, "2");
						break;
					case 3:
						appUpdate(curVer, "3");
						break;
				}
			}
		</script>
	</body>

</html>